using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class ShippingCostServiceUtil
    {
	
		static internal IShippingCostService CreateShippingCostService()
        {
            IShippingCostService target = IoCFactory.Resolve<IShippingCostService>();
            return target;
        }
				#region ShippingCost Test
 
        

		public static ShippingCost CreateShippingCost()
        {
            ShippingCost result = GetShippingCost();
            IShippingCostService service = CreateShippingCostService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static ShippingCost CreateShippingCostFull()
        {
            ShippingCost result = GetShippingCostFull();
            IShippingCostService service = CreateShippingCostService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static ShippingCost GetShippingCost()
        {
            ShippingCost result = new ShippingCost();
			
            result.RangeMin = Math.Round(((decimal)new Random().NextDouble()), 2, MidpointRounding.ToEven);


            result.RangeMax = Math.Round(((decimal)new Random().NextDouble()), 2, MidpointRounding.ToEven);


            result.Cost = Math.Round(((decimal)new Random().NextDouble()), 2, MidpointRounding.ToEven);

 
            return result;
            
        }
		
        public static ShippingCost GetShippingCostFull()
        {
            ShippingCost result = GetShippingCost();
             
            return result;
            
        }
		
		#endregion ShippingCost Test
	

	}
}
